<html>
<head>
    <meta charset="utf-8">
    <title>微信用户</title>
    <#assign base=request.contextPath  />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${base}/backstage/layui/css/layui.css" media="all">
    <script src="${base}/sweep/js/mui.min.js"></script>
    <script src="${base}/backstage/layui/layui.js"></script>
    <script src="${base}/backstage/js/feng.js"></script>
    <script>
        var base =  "${base}";
    </script>
    <script src="${base}/backstage/js/ipNameUrl.js"></script>
    <style>
        /*给数据表格加高*/
        .layui-table-cell{
            height:50%;
        }

    </style>
</head>
<body>
<table class="layui-hide" id="test" lay-filter="test"></table>
<script>
    layui.use(['table', 'form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , $ = layui.jquery
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate
            , table = layui.table;

        var whereData = {}
        whereData.name = $("#name").val();
        whereData.phone = $("#phone").val();
        whereData.idNumber = $("#idNumber").val();

        table.render({
            skin: 'line' //行边框风格
            , even: false //开启隔行背景
            , elem: '#test'
            , whereData: whereData
            , url: '${base}/admin/user/selectMyPage'
            // , toolbar: '#toolbarDemo'
            ,cols:[[
                {field:'id', title: '序号',templet:function(val){
                        return val.LAY_INDEX
                    },align:'center'},
                {field:'nickName', title: '昵称', align:'center'},
                {field:'tel', title: '手机号', align:'center'},
                {field:'imge', title: '头像地址',templet:function(val){
                        return "<img src="+val.imge+">";
                    },  align:'center'},
                {field:'userIdentity', title: '身份', templet:function(val){
                        if(val.userIdentity==undefined){
                            return ""
                        };
                        if(val.userIdentity==1){
                            return "<div>用户</div>"
                        };
                        if(val.userIdentity==2){
                            return "<div style='color: #fff;background: #009f95'>商家</div>"
                        };
                        if(val.userIdentity==3){
                            return "<div style='color: #fff;background: #df5000'>销售</div>"
                        };
                    }, align:'center'},
                {field:'moeny', title: '余额', align:'center'},
                {field:'country', title: '国家', align:'center'},
                {field:'province', title: '省份', align:'center'},
                {field:'city', title: '城市', align:'center'},
                {field:'integral', title: '积分', align:'center'},
                {field:'discountCode', title: '邀请码', align:'center'},
                {field:'createTime', title: '创建时间',templet:function(val){
                        if(val.createTime==undefined){
                            return "";
                        }
                        return changeDateFormat(val.createTime);
                    },  align:'center'}
            ]]
            , id: 'testReload'
            , page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                , theme: '#1AB394'
                , limit: 10
            }
        });
    })


</script>
</body>
</html>


